/**
 * 
 */
package ao.com.bna.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * @author dfancone
 * 
 */

@Entity
@Table(name = "BOLEANDESCONTO")
public class BoleanDesconto implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "BOLEANDESCONTO_ID_GENERATOR", sequenceName = "BOLEANDESCONTO_SEQ",allocationSize=1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BOLEANDESCONTO_ID_GENERATOR")
	@Column(nullable = false, precision = 6)
	private Long idBoleanDesconto;

	private String nome;

	
	@OneToMany(mappedBy="boleanDesconto")
	private Collection<ExtensaoProcesso> extensaoProcessoCollection;


	public Long getIdBoleanDesconto() {
		return idBoleanDesconto;
	}


	public void setIdBoleanDesconto(Long idBoleanDesconto) {
		this.idBoleanDesconto = idBoleanDesconto;
	}


	public String getNome() {
		return nome;
	}


	public void setNome(String nome) {
		this.nome = nome;
	}


	public Collection<ExtensaoProcesso> getExtensaoProcessoCollection() {
		return extensaoProcessoCollection;
	}


	public void setExtensaoProcessoCollection(
			Collection<ExtensaoProcesso> extensaoProcessoCollection) {
		this.extensaoProcessoCollection = extensaoProcessoCollection;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((idBoleanDesconto == null) ? 0 : idBoleanDesconto.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BoleanDesconto other = (BoleanDesconto) obj;
		if (idBoleanDesconto == null) {
			if (other.idBoleanDesconto != null)
				return false;
		} else if (!idBoleanDesconto.equals(other.idBoleanDesconto))
			return false;
		return true;
	}


	@Override
	public String toString() {
		return "BoleanDesconto [idBoleanDesconto=" + idBoleanDesconto + "]";
	}



	
	

}